﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sinacor.Infra.Service.Security.Authorization;
using PSE.ProcessManager.Server.Process.Security;

namespace Sinacor.Infra.Core.ProcessManager.Server.Security
{
    public class SinacorAuthorizationContext : BaseAuthorizationContext
    {
        protected override int GetUserId()
        {
            return AuthenticationContext<SinacorAuthenticationData>.Current.AuthenticationData.UserId;
        }

        protected override string GetLoginName()
        {
            return AuthenticationContext<SinacorAuthenticationData>.Current.AuthenticationData.LoginName;
        }

        protected override string GetPassword()
        {
            return AuthenticationContext<SinacorAuthenticationData>.Current.AuthenticationData.Password;
        }

        protected override int GetCompanyId()
        {
            return AuthenticationContext<SinacorAuthenticationData>.Current.AuthenticationData.CompanyId;
        }

        protected override string GetModuleId()
        {
            return AuthenticationContext<SinacorAuthenticationData>.Current.AuthenticationData.ModuleId;
        }
    }
}
